import React, { Component } from 'react';
import { List, Card, Avatar } from "antd"
import style from './style.less';
import { UserOutlined } from '@ant-design/icons';

class Send extends Component {
    //全部数据
    card_map = data => {
        return (
            <Card
                hoverable={true}
                bordered={false}
            >
                <div className={style.div_body}>
                    <div className={style.div_body_left}>
                        <div><Avatar icon={<UserOutlined />} /></div>
                        <div>{data.name}</div>
                        <div style={{ fontSize: "10px", color: "rgb(136, 135, 133)" }}>
                            {data.connect}
                        </div>
                    </div>

                    <div style={{ fontSize: "10px", color: "rgb(136, 135, 133)" }}>
                        {data.createTime}
                    </div>
                </div>
            </Card>
        )
    }
    render() {

        return (
            <div>
                <List
                    dataSource={inbox}
                    renderItem={item => (
                        <List.Item >
                            {this.card_map(item)}
                        </List.Item>
                    )}
                />
            </div>
        );
    }
}
export default Send;
const inbox = [
    {
        "key": "1",
        "name": "程文星1",
        "createTime": "2020-10-1",
        "connect": "无主题"
    },
    {
        "key": "2",
        "name": "程文星2",
        "createTime": "2020-10-1",
        "connect": "无主题"
    },
    {
        "key": "3",
        "name": "程文星4",
        "createTime": "2020-10-1",
        "connect": "无主题"
    },
    {
        "key": "4",
        "name": "程文星4",
        "createTime": "2020-10-1",
        "connect": "无主题"
    }
]